# coding:utf8

"""
全局配置
"""

SERVER_NAME = "CK_IOT"
SERVER_DESCRIPTION = u"创客空间物联网平台"
SERVER_VERSION = "1.0.0"
SERVER_COPYRIGHT = u"CopyRight@山西创客空间科技有限公司"

DEBUG = True
HOST = "0.0.0.0"
PORT = 8080
THREADED = True
EXP_TIME=3000    # token valid time, unit is minute

"""
MySQL配置
"""
SQLALCHEMY_DATABASE_URI = "mysql+pymysql://root:mysql@127.0.0.1/ck_iot_B"
# SQLALCHEMY_DATABASE_URI = "mysql+pymysql://root:mysql@localhost/test"
SQLALCHEMY_BINDS = {
    "main": "mysql+pymysql://root:mysql@127.0.0.1/ck_iot_B"
}
# SQLALCHEMY_BINDS = {
#     "main": "mysql+pymysql://root:mysql@127.0.0.1/test"
# }
# 查询时不会显示原始SQL语句
# SET FOREIGN_KEY_CHECKS = 0 #关闭外键约束
SQLALCHEMY_ECHO = False
SQLALCHEMY_NATIVE_UNICODE = "utf-8"
SQLALCHEMY_POOL_SIZE = 5
SQLALCHEMY_POOL_TIMEOUT = 10

"""
MongoDB配置
"""
MONGO_HOST = "127.0.0.1"
MONGO_PORT = 27017
MONGO_USER = ""
MONGO_PWD = ""
MONGO_DB = "CK_GPS_Product"

"""
Redis配置
"""
REDIS_HOST = "127.0.0.1"
REDIS_PORT = 6379
REDIS_PWD = "SooyieHX"
REDIS_TIMEOUT = 0.5
REDIS_DB = [
    ('sys', 0),
    ('msg', 1),
    ('mall', 2),
    ('payment', 3),
    ('pay', 4)
]
